<template>
	<view class="goods-box">
		<view class="e-flex e-flex-wrap ">
			<view
				class="goods-item bg-white"
				v-for="item in list"
				:key="item.id"
				@tap="
					$goTo('/pages/yuncang/goods/index',{
						id: item.id
					})
				"
			>
				<view class="image" :style="{height}">
					<load-image mode="aspectFill" :size="['100%',height]" :src="item.coverUrl" />
				</view>
				<view class="goods-body e-p-20 ">
					<view class="goods-title ">
						<text class="e-line-2">{{ item.title }}</text>
					</view>
					<view >
						<view class="price fw-500 c-red e-m-t-20">
							<text class="e-font-24">{{$unitEn}}</text>
							<text class="e-font-32">{{ item.price }}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
		<load-more v-if="list.length" :showLoad="showLoad"></load-more>
	</view>
</template>

<script>
export default {
	props: {
		showLoad: Boolean,
		list: Array,
		height:{
			type:String,
			default:'346rpx'
		}
	},
}
</script>

<style lang="scss" scoped>
.goods-box {
	padding: 20rpx 22rpx;
	scroll-view {
		height: 100%;
	}
	.goods-item {
		flex: 0 0 calc((100% - 20rpx)/2);
		margin: 0 20rpx 20rpx 0;
		border-radius: 10rpx;
		overflow: hidden;
		&:nth-child(2n) {
			margin-right: 0;
		}
		.image {
			width: 100%;
		}
		.goods-body {
			height: 176rpx;
		}
	}
}
</style>
